package example.service;
import src.example.service.UserInfo;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;

/**
 * @author: fds
 * @date: 2019/11/19
 * @description: ��
 */@WebService()
public class HelloWorld {
  @WebMethod
  public UserInfo sayHelloWorldFrom(String from) {
    String result = "Hello, world, from " + from;
    UserInfo userInfo = new UserInfo();
    userInfo.setName(from);
    userInfo.setAddress("南京路");
    userInfo.setJobs("爱好");
    userInfo.setAge("22");
      System.out.println(userInfo);
    return userInfo;
  }
  public static void main(String[] argv) {
    Object implementor = new HelloWorld ();
    String address = "http://localhost:9000/HelloWorld";
    Endpoint.publish(address, implementor);
      System.out.println("webservice 发布成功地址：" + address);
  }
}
